package pshycomanagement

class User {
    
    String name
    String lastName
    Date bornDate
    String email
    String genre
    String country
    String city
    String address
    int phone
    long cellPhone
    String latterStudy
    String experience
    //static hasOne=[security:Security]
    static hasmany=[result:Result]
    
    static constraints = {
    name blank: false, size: 2..30 
    lastName blank:false, size: 2..30
    address size: 5..20
    phone size: 7..10
    latterStudy blank:false
    genre blank:false, inList: ["Feminine","Masculine"]
    country blank:false , inList: ["Colombia","Canada"]
    city blank:false, inList: ["Bogota","Ibague"]
    email blank:false, email:true 
    bornDate blank:false, max: new Date()
    cellPhone blank:false
    latterStudy blank:false    
    }
    
    String toString() {
        "${name}${lastName}"
    }
}
